<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                    <title>phMagick code samples</title>
        
                        <link rel="stylesheet" href="asset/css/ftest-min.css"
        
    </head>
    <body>
        <div class="wrapper">

                <h1>
                    
                    phMagick code samples
                </h1>

                            
<p>These are the code examples available for phMagick</p>
<p>Browse them, read the code, see the result of each code block, and have fun</p>
<p>If you have questions ot suggestions

just drop us a line

</p>
            
            <div class="stage">
                <div class="left">
                    <ul class="navigation">
    <li>
        <h2>Code Samples</h2>
    </li>
    <li>
        <a href="index.html">home</a>
    </li>
            <li>
            <a href="    Convert.html
"> Converts an image into another format.
</a>
        </li>
            <li>
            <a href="    Watermark.html
">Creating Watermarks</a>
        </li>
            <li>
            <a href="    Resize:_Strech.html
">Thumbnails</a>
        </li>
            <li>
            <a href="    Porportional.html
"> Proportional Resize

</a>
        </li>
            <li>
            <a href="    Crop.html
">Cropping images</a>
        </li>
    </ul>                </div>

                <div class="content">
                    <div class="test Porportional">
    <a name="test.Porportional"></a>
    <h2 class=""> Proportional Resize

</h2>
        <p class="description"> Resizes an Image while mantaining aspect ratio (not distorcing the image).<br />
 Because of Aspect Ration constrains, the final image might not have the  specified size, but it will have the closest possible without distorcing  the image.<br />
      </p>


                <img src="results/resize_100_100.jpg">
           
    <div class="codeContainer">
        <h3 class="code"><a href="#">Code:</a></h3>
        <pre class="code brush: php;">        $phMagick = new \phMagick\Core\Runner();

        $resizeAction = new \phMagick\Action\Resize\Proportional($this-&gt;originalFile, $this-&gt;newFile);
        $resizeAction-&gt;setWidth(100);
        $phMagick-&gt;run($resizeAction);
</pre>
    </div>
</div>

                </div>
            </div>
                                <script type="text/javascript" src="./asset/js/ftest-all-min.js"></script>
            
            <div class="footer">
                <p>generated by <a target="blank" class="fTest" href="http://www.ftest.org">fTest</a></p>
            </div>
        </div>
    </body>
</html>